package com.ruoyi.system.domain.xs;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 订单来源对象 xs_order_source
 *
 * @author ruoyi
 * @date 2025-01-13
 */
public class XsOrderSource extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    private Long id;

    /**
     * 排序
     */
    @Excel(name = "排序")
    private Long sort;

    /**
     * 来源名称
     */
    @Excel(name = "来源名称")
    private String sourceName;

    /**
     * 来源编号
     */
    @Excel(name = "来源编号")
    private Long sourceCode;

    /**
     * 比例（0~100，例：8.5折扣=85、8折=80）
     */
    @Excel(name = "比例", readConverterExp = "0=~100，例：8.5折扣=85、8折=80")
    private Long ratio;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setSort(Long sort) {
        this.sort = sort;
    }

    public Long getSort() {
        return sort;
    }

    public void setSourceName(String sourceName) {
        this.sourceName = sourceName;
    }

    public String getSourceName() {
        return sourceName;
    }

    public void setSourceCode(Long sourceCode) {
        this.sourceCode = sourceCode;
    }

    public Long getSourceCode() {
        return sourceCode;
    }

    public void setRatio(Long ratio) {
        this.ratio = ratio;
    }

    public Long getRatio() {
        return ratio;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("sort", getSort())
                .append("sourceName", getSourceName())
                .append("sourceCode", getSourceCode())
                .append("ratio", getRatio())
                .append("createTime", getCreateTime())
                .append("createBy", getCreateBy())
                .append("updateTime", getUpdateTime())
                .append("updateBy", getUpdateBy())
                .append("remark", getRemark())
                .toString();
    }
}
